import axios from '@/utils/request';

/**
 * 查询业务员提成报表数据集数据集
 */
 export async function QueryPaysalecommissionByCondition(params) {
    const res = await axios.post('/Paysalecommission/QueryPaysalecommissionByCondition',params);
    if (res.data.code === 200) {
        return res.data.data;
    }
    return Promise.reject(new Error(res.data.msg));
}


/**
 * 新增客户提成付款
 */
export async function AddPaysalecommission(params) {
    const res = await axios.post('/Paysalecommission/AddPaysalecommission',params);
    if (res.data.code === 200) {
        return res.data.msg;
    }
    return Promise.reject(new Error(res.data.msg));
}


 /**
  * 反核销
  */
 export async function AnitPaysalecommission(id) {
    const res = await axios.post('/Paysalecommission/AnitPaysalecommission?id='+id);
    if (res.data.code === 200) {
        return res.data.msg;
    }
    return Promise.reject(new Error(res.data.msg));
}

